//
//  tranSumViewCell.swift
//  NewLndd
//
//  Created by 邵禹曦 on 2020/1/7.
//  Copyright © 2020 辽宁当代. All rights reserved.
//

import UIKit
// MARK: - 成交汇总
class tranSumViewCell: UITableViewCell {
    
    @IBOutlet weak var CON: UILabel!     // 商品名称
    @IBOutlet weak var COI: UILabel!   // 商品代码
    @IBOutlet weak var BQ: UILabel!      // 买入量
    @IBOutlet weak var BF: UILabel!   // 买入手续费
    @IBOutlet weak var BUA: UILabel!    // 买入均价
    @IBOutlet weak var SQ: UILabel! //SQ卖出量
    @IBOutlet weak var SF: UILabel!  //SF 卖出手续费
    @IBOutlet weak var SEA: UILabel!  //卖出均价
    @IBOutlet weak var WF: UILabel! //仓储费
    @IBOutlet weak var TF: UILabel! // 托管费
    
    // MARK: - 自定义属性
    var ViewModel : tranSum? {
        
        
        // 属性监听器
        didSet {
            
            // 1. nil值校验
            guard let ViewModel = ViewModel else {
                return
            }
            
            COI.text = ViewModel.COI
            CON.text = ViewModel.CON
            BQ.text = ViewModel.BQ
            BF.text = ViewModel.BF
            BUA.text = ViewModel.BUA
            SQ.text = ViewModel.SQ
            SF.text = ViewModel.SF
            SEA.text = ViewModel.SEA
            WF.text = ViewModel.WF
            TF.text = ViewModel.TF
            
            
        }
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
